package com.whc.service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.system.common.mapper.BisBusinessOrderMapper;
import com.system.common.mapper.BisShopMapper;
import com.system.common.pojo.BisBusinessOrder;
import com.system.common.pojo.BisShop;
@Service
public class BisBusinessOrderServiceImpl implements BisBusinessOrderService{
	@Autowired
	private BisBusinessOrderMapper orderMapper;
	@Autowired
	private BisShopMapper bisShopMapper;
	@Override
	public List<BisBusinessOrder> selectAll(Map<String, Object> map) {
		List<BisBusinessOrder> orders=new ArrayList<>();
		List<BisBusinessOrder> list=orderMapper.listAll(map);
		for (BisBusinessOrder order : list) {
			if (!order.getOrderStatus().equals("0")) {
				orders.add(order);
			}
		}
		return orders;
	}
	
	
	public List<BisShop> listAllShop(){
		List<BisShop> list=bisShopMapper.selectByExample(null);
		return list;
	}
}
